package com.training.java.core.collections.car.post15;

import java.util.ArrayList;
import java.util.List;

public class CellPhoneDemo {

	public static void main(String[] args) {

		CellPhone mobile1 = new CellPhone("Apple", "iPhone5S", "ios");
		CellPhone mobile2 = new CellPhone("Samsung", "Galaxy2", "Android");
		CellPhone mobile3 = new CellPhone("Nokia", "S200", "Windows");

		List<CellPhone> mobiles = new ArrayList<CellPhone>();

		mobiles.add(mobile1);
		mobiles.add(mobile2);
		mobiles.add(mobile3);

		for (CellPhone aCellPhone : mobiles) {

			System.out.println("Company = " + aCellPhone.getCompany());
			System.out.println("Model = " + aCellPhone.getModel());
			System.out.println("OperatingSystem = "
					+ aCellPhone.getOperatingSystem());

		}

	}

}
